<?php
namespace Staff\Model;
use Think\Model\RelationModel;
class FoodModel extends RelationModel {
	protected $_link = array (
			'FoodCategory' => array (
					'mapping_type' => self::HAS_MANY,
					'foreign_key'   => 'fid',
    				'mapping_name'  => 'category',
			)
			// 定义更多的关联属性
	);
	protected $_auto = array(
			array('ctime','time',self::MODEL_INSERT,'function'),
	);
}